package lukeer.fencing;

import java.io.FileNotFoundException;

/**
 * Main class for Part A.
 *
 * User: Luke Richardson lukeer, Wafa M'Barek wmbarek
 * Date: 09/08/12
 * Time: 05:56
 */
public class TestWin implements csproj.fencing.Piece {
    public static void main(String args[]) {
        try {
            Board b = new Input(args[0]).getBoard();
            b.calculateResult();

            switch (b.getResult()) {
                case INVALID:
                    System.out.println("None");
                    break;
                case BLACK:
                    System.out.println("Black");
                    break;
                case WHITE:
                    System.out.println("White");
                    break;
                case EMPTY:
                    System.out.println("Draw");
                    break;
            }
            System.out.println(b.getTotalBlack());
            System.out.println(b.getTotalWhite());
        } catch (FileNotFoundException e) {
            System.out.println("Error loading board into memory");
            e.printStackTrace();
        }
    }
}
